import "./assets/global.css";
import App from "./App.vue";
import { createApp } from "vue";
import { createPinia } from "pinia";
import { createPersistedState } from "pinia-plugin-persistedstate";
import router from "./router";
//按需引入需要额外引入Elmessage和Elloading的css样式文件
import "element-plus/theme-chalk/el-loading.css";
import "element-plus/theme-chalk/el-message.css";
import "element-plus/theme-chalk/el-notification.css";
import "element-plus/theme-chalk/el-message-box.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 设置语言环境，一个基于小时、分钟、和大写/小写返回正确字符串。
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// 安装pinia
const pinia = createPinia();
pinia.use(createPersistedState());
app.use(pinia);
app.use(router);
import "@/router/permission";
app.mount("#app");
